Order-preserving removal is O(n) using append to shift elements. Order-non-preserving removal is O(1) by swapping the target with the last element and truncating.
Use order-preserving for user-visible lists, queues, ordered results
Use O(1) swap for internal buffers, worker job queues, sets where order is irrelevant
For very frequent removals from large slices, consider a linked list instead
Be careful with the shared-array problem: removeOrdered mutates the original backing array
Go 1.21 slices package provides slices.Delete() for order-preserving removal